
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<?php
    //variables
    //arrays need to hold class job and skills as keys
    $name = "Nick Cook";
    $blurb = "I am in my last semester at FSU as an information technology major. I currently work for a local ISP as a network technician. After graduation I hope to become involved in the rural health care network initiative in the big bend.";
    $i = 0;
    $arrayout = array();
    $arrayout["classes"] = array('LIS4368' => 'Web w/ Php','GEA1000' => 'World Geography');
    $arrayout["jobs"] = array('Electronet' => 'Network Tech','Advocare' => 'Electrical Engeneer');
    $arrayout["skills"] = array('Java', 'SQL', 'Database Design');

    //nested arrays
    //classes course num as key name as value
    //jobs comp name as key title as value
    //skills values are skills no keys

?>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title><?php echo $name; ?> </title>
        <style type="text/css">

        table {
            border: 1px solid #000;
            margin: 1px auto;
        }

        table td {
            border: 1px solid #000;
        }

        h1 {
            text-align: center;
        }

        p {
            text-align: center;
        }
        </style>

    </head>
    <body>
        <?php
            //print name in head and the intro
            echo "<h1>" . $name . "</h1>";
            echo "<p>" . $blurb . "</p>";
        ?>

        <!--3 tables printing out the data in arrays-->

        <?php

        //print out individual tables w/ keys as headers
        foreach($arrayout as $out => $value) //out are header names value is arrays
        {
            echo "<table>";
            echo "<thead>";
            echo "<tr>";
            echo "<th> $out <th>";
            echo "</tr>";
            echo "</thead>";
            echo "<tbody>";

            foreach ($value as $key => $input)//value are the nested arrays
                {
                echo "<tr>";
                if($i < 2){ //if to not print key column for skills table
                echo "<td> $key </td>"; }
                echo "<td> $input </td>";
                echo "</tr>";
                }
                
            echo "</tbody>";
            echo "</table>";
            $i++;
        }
        ?>

</body>
</html>